<template>
    <div ref="app">
        <Detail 
            :name="detailList.title"
            :Releasetime="detailList.createtime"
            :author="detailList.author"
            :number="detailList.read_num"
            :cover_image="detailList.cover_image"
            :content="detailList.content"
        />
         
      
    </div>

</template>

<script>
import Detail from "../../components/details";
export default {
    components: {
        Detail
    },
    watch: {
        $route(){
            this.$refs.app.scrollTo(0,0);
        }
    },
    data(){
        return{
            detailid: '',
            detailList: {},
        }
    },
    created(){
        // console.log(this.$route.query.id);
        this.detailid = this.$route.query.id
        this.getdetails()

    },
    methods: {
        // 获取详情信息
        async getdetails(){
            const {data:res}  = await this.$axios.post("index/CemeteryArticleDetail",{
                id:   this.detailid
            })
            console.log(res);
            
            this.detailList = res.data
        },
    }

}
</script>

<style lang="scss">

</style>